﻿@model IEnumerable<FTchinaMVC.Models.Book>

@{
    ViewBag.Title = "列表";
}

<h2>列表</h2>

<p>
    @Html.ActionLink("添加", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.BookName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Author)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Publisher)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Price)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Remark)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.BookName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Author)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Publisher)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Price)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Remark)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.BookID }) |
            @Html.ActionLink("Details", "Details", new { id=item.BookID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.BookID })
        </td>
    </tr>
}

</table>
